const str = '124samkdnb234'
let res = false
const reg = /\d{3}/g
str.replace(reg,match => {
    console.log(match);
    if (+match[0] === +match[1] - 1 && +match[1] - 1 === +match[2] - 2) {
        res = true
        return match
    }
})
console.log(res)
